//
// Created by NASA on 2023/11/12.
//


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

bool cmp(int aa,int bb)
{
    return aa>bb;
}

int main()
{
    struct abc
    {
        int a;
        int b;
    };
    abc x={1,2};
    abc y={10,20};
    abc l[2]={x,y};
//    for (int i = 0; i < 2; ++i)
//    {
//        cout<<l[i].a<<' '<<l[i].b<<endl;
//    }
    int l2[5]={7,5,8,3,4};
    sort(l2,l2+5);
    for (int i : l2)
    {
        cout<<i<<' ';
    }
    cout<<endl;

    vector <int>l3={7,5,8,3,4};
    sort(l3.begin(),l3.end());
    for (int i = 0; i < 5; ++i)
    {
        cout<<l3[i]<<' ';
    }
    cout<<endl;

    sort(l2,l2+5,cmp);
    for (int i : l2)
    {
        cout<<i<<' ';
    }
    cout<<endl;
    return 0;
}